\hypertarget{class_http_client}{\section{Http\+Client类 参考}
\label{class_http_client}\index{Http\+Client@{Http\+Client}}
}


http客户端类.  




{\ttfamily \#include $<$Http\+Client.\+h$>$}

类 Http\+Client 继承关系图\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_http_client}
\end{center}
\end{figure}
\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
sint32 \hyperlink{class_http_client_a86d8e5938c249e5d7bebd3928ebf2753}{http\+Get} (const std\+::string url, \hyperlink{class_file}{File} $\ast$cache\+File, int timeout\+Seconds=20)
\begin{DoxyCompactList}\small\item\em 发送\+G\+E\+T请求 \end{DoxyCompactList}\item 
sint32 \hyperlink{class_http_client_a7e7cb758682d855db805f2bd93ead7b9}{http\+Post} (const std\+::string url, const std\+::string post\+String, \hyperlink{class_file}{File} $\ast$cache\+File, int timeout\+Seconds=20)
\begin{DoxyCompactList}\small\item\em 发送\+P\+O\+S\+T请求 \end{DoxyCompactList}\item 
sint32 \hyperlink{class_http_client_a0322c604a9ec9d79d3bbfccb747a4bef}{http\+File\+Down\+Load} (const std\+::string url, \hyperlink{class_file}{File} $\ast$cache\+File)
\begin{DoxyCompactList}\small\item\em 文件下载请求 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{详细描述}
http客户端类. 

\subsection{成员函数说明}
\hypertarget{class_http_client_a0322c604a9ec9d79d3bbfccb747a4bef}{\index{Http\+Client@{Http\+Client}!http\+File\+Down\+Load@{http\+File\+Down\+Load}}
\index{http\+File\+Down\+Load@{http\+File\+Down\+Load}!Http\+Client@{Http\+Client}}
\subsubsection[{http\+File\+Down\+Load}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Http\+Client\+::http\+File\+Down\+Load (
\begin{DoxyParamCaption}
\item[{const std\+::string}]{url, }
\item[{{\bf File} $\ast$}]{cache\+File}
\end{DoxyParamCaption}
)}}\label{class_http_client_a0322c604a9ec9d79d3bbfccb747a4bef}


文件下载请求 


\begin{DoxyParams}{参数}
{\em url} & 目标文件\+U\+R\+L \\
\hline
{\em cache\+File} & 缓存文件(必须具有可写属性),用于接收服务器回应数据 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回\+S\+T\+A\+T\+U\+S\+\_\+\+O\+K,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R. 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_http_client_a86d8e5938c249e5d7bebd3928ebf2753}{\index{Http\+Client@{Http\+Client}!http\+Get@{http\+Get}}
\index{http\+Get@{http\+Get}!Http\+Client@{Http\+Client}}
\subsubsection[{http\+Get}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Http\+Client\+::http\+Get (
\begin{DoxyParamCaption}
\item[{const std\+::string}]{url, }
\item[{{\bf File} $\ast$}]{cache\+File, }
\item[{int}]{timeout\+Seconds = {\ttfamily 20}}
\end{DoxyParamCaption}
)}}\label{class_http_client_a86d8e5938c249e5d7bebd3928ebf2753}


发送\+G\+E\+T请求 


\begin{DoxyParams}{参数}
{\em url} & 目标\+U\+R\+L \\
\hline
{\em cache\+File} & 缓存文件(必须具有可写属性),用于接收服务器回应数据 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回\+S\+T\+A\+T\+U\+S\+\_\+\+O\+K,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R. 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_http_client_a7e7cb758682d855db805f2bd93ead7b9}{\index{Http\+Client@{Http\+Client}!http\+Post@{http\+Post}}
\index{http\+Post@{http\+Post}!Http\+Client@{Http\+Client}}
\subsubsection[{http\+Post}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Http\+Client\+::http\+Post (
\begin{DoxyParamCaption}
\item[{const std\+::string}]{url, }
\item[{const std\+::string}]{post\+String, }
\item[{{\bf File} $\ast$}]{cache\+File, }
\item[{int}]{timeout\+Seconds = {\ttfamily 20}}
\end{DoxyParamCaption}
)}}\label{class_http_client_a7e7cb758682d855db805f2bd93ead7b9}


发送\+P\+O\+S\+T请求 


\begin{DoxyParams}{参数}
{\em url} & 目标\+U\+R\+L \\
\hline
{\em post\+String} & post字符串 \\
\hline
{\em cache\+File} & 缓存文件(必须具有可写属性),用于接收服务器回应数据 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回\+S\+T\+A\+T\+U\+S\+\_\+\+O\+K,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R. 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
libemb/inc/\hyperlink{_http_client_8h}{Http\+Client.\+h}\item 
libemb/src/Http\+Client.\+cpp\end{DoxyCompactItemize}
